<script>
$(document).ready(function() {
    updateDisplay();
    $(window).resize(function () {
        updateDisplay();
    });

    //$("#content").on("DOMSubtreeModified", function() {
    //    updateDisplay();
    //});
    $("#frame-layout-left").css({"left":"0"});
    $("#frame-layout-center").css({"margin-left":"190px","overflow-y":"auto","overflow-x":"hidden","table-layout":"fixed","word-wrap":"break-word","word-break":"break-all"});
    $("#rotate").css({"transform":"rotate(270deg)"});
    var bool = false;
    $(".jianiconbao").click(function(){
    	if(bool == false){
    		$("#frame-layout-left").css({"transition":"all 1s","left":"-190px"});
    		$("#frame-layout-center").css({"transition":"all 1s","margin-left":"0","overflow-y":"auto","overflow-x":"hidden","table-layout":"fixed","word-wrap":"break-word","word-break":"break-all"});
    		$("#rotate").css({"transition":"all 1s","transform":"rotate(90deg)"});
    		bool = true;
    	}else{
    		$("#frame-layout-left").css({"transition":"all 1s","left":"0"});
    		$("#frame-layout-center").css({"transition":"all 1s","margin-left":"190px","overflow-y":"auto","overflow-x":"hidden","table-layout":"fixed","word-wrap":"break-word","word-break":"break-all"});
    		$("#rotate").css({"transition":"all 1s","transform":"rotate(270deg)"});
    		bool = false;
    	}
    });
});

function updateDisplay() {
    var windowHeight = $(window).height();
    var windowWidth = $(window).width();

    $("body").height(windowHeight);
    $("#frame-layout-left").height(windowHeight - $("#frame-layout-top").height()-$("#frame-layout-bottom").height());
    $("#frame-layout-center").height(windowHeight - $("#frame-layout-top").height()-$("#frame-layout-bottom").height());
    /* $("#frame-layout-center").width(windowWidth - $("#frame-layout-left").width()-10); */

}
</script>

<div ng-controller="z-nav-c" >
	<div id="frame-layout" ng-class="{true:'no-nav-bar'}[menuData.length<=1]">
		<div id="frame-layout-top" >
	        <div style="height: 100%;">
				<div class="col-md-12" style="height: 100%;
    line-height: 48px;">
					<div style="float:left">
<!-- 						<img alt="" id="logo"> -->
						<div style="color:#fff;font-size:24px;font-weight:bold;">
	                        <a style="color:#fff;font-size:24px;font-weight:bold;text-decoration:none">
	                        
	                        </a>
	                    </div>
<!-- 						<img alt="" id="sys-title"> -->
	                    <div class="top_logo" style="color:#fff font-size:18px;" >
	                    	<img alt="" src="static/css/images/logo_sp.png" style="left:20px;" draggable="false">
	                    </div>
	                    <div class="jianiconbao" title="菜单栏">
						      <i id="rotate" class="glyphicon glyphicon-upload" style="font-size:24px;top:7px;color: #ffffff;"></i>
						</div>
	                </div>
					<div ng-controller="z-logout-c" style="float:right;">
						<span ng-if="currentUser!=null">
							     <!-- <div class="iconbao" ng-if="tipType" id="tipType" title="待办事项">
	                                <a data-toggle="dropdown" aria-expanded="true"> 
	                                	<i class="glyphicon glyphicon-bell glyphicon" style="color:#ffffff;font-size:24px;top:7px;"></i> 
	                                	<div class="bellRightUp"   ng-if="tipData.total>0">{{tipData.total}}</div>
	                                </a>
	                                <ul class="dropdown-menu notification-menu right animated fadeInDown" role="menu">
	                                    <li class="clearfix" ng-click="tipClick(1)">
	                                        <i class="fa symbol"></i>
	                                        <span class="notification-action">补签审批 </span> 
	                                        <span class="notification-link">{{tipData.retroactiveNum}}</span>
	                                    </li>
	                                    <li class="clearfix" ng-click="tipClick(2)">
	                                        <i class="fa symbol"></i>
	                                        <span class="notification-action">休假审批 </span> 
	                                        <span class="notification-link">{{tipData.furloughNum}}</span>
	                                    </li>
	                                    <li class="clearfix" ng-click="tipClick(3)">
	                                        <i class="fa symbol"></i>
	                                        <span class="notification-action">加班审批</span> 
	                                        <span class="notification-link">{{tipData.overTimeNum}}</span>
	                                    </li>
	                                    <li class="clearfix" ng-click="tipClick(4)">
	                                        <i class="fa symbol"></i>
	                                        <span class="notification-action">出差审批</span> 
	                                        <span class="notification-link">{{tipData.businessTravelNum}}</span>
	                                    </li>
	                                    <li class="clearfix" ng-click="tipClick(5)">
	                                        <i class="fa symbol"></i>
	                                        <span class="notification-action">外出审批</span> 
	                                        <span class="notification-link">{{tipData.goOutNum}}</span>
	                                    </li>
	                                </ul>
							     </div> -->
							     <!-- <div class="iconbao" ng-if="tipType" ng-click="getTips()" title="刷新(待办事项)">
								 	<i class="ec-refresh" style="color:#ffffff;font-size:24px;top:7px;"></i>
								 </div> -->
				                 <!-- <div class="iconbao">f68484 !important
							        <i ng-click="onClick()"  class="glyphicon glyphicon-cog" style="color:#ffffff;font-size:24px;top:7px;" title="个人信息"></i>
							        <div class="cogRightUp">10</div>
							     </div> -->
								<span class="iconbao" style="width:100px;padding-left: 10px;padding-right: 10px;color:#ffffff;float: left;">
									<i class="fa fa-user" style="font-size:24px;top:7px;"></i>
									<span>&nbsp{{currentUser.chineseName==undefined?currentUser.userName:currentUser.chineseName}}</span>
								</span>
			                    <a data-toggle="modal" data-target="#passwordEditWindow"
									data-backdrop="static"
									ng-click="showChangePassWindow()" >
									<div class="iconbao" title="修改密码"><i class="fa fa-unlock-alt" style="color:#ffffff;font-size:24px;top:7px;"></i></div></a>
		                   		<a ng-click="logout()"><div class="iconbao" title="注销"><i class="glyphicon glyphicon-log-out" style="color:#ffffff;font-size:24px;top:7px;"></i></div></a>
		                   		<div ng-Include src="'static/html/home/changePass.html'" ng-init="editModel.windowId='passwordEditWindow'"></div>
						</span>
						<span ng-if="currentUser==null">
								<a ng-click="Login()">
									<i class="glyphicon glyphicon-user"><span>&nbsp登陆</span></i>
								</a>
						</span>
	                </div>
				</div>
	        </div>
		</div>
		<div id="frame-layout-left">
	    	<div id="sidebar" class="navbar-default">
		    	<div id="main-nav" z-tree tree-data="menuData" ctrl-ref="menuTree"
		                  on-select="onMenuTreeSelect(node)" 
		                  template="static/html/directives/treeTemplate.html"></div>
	       	</div>
		</div>
		<div id="frame-layout-center" >
	        <!-- <div id="frame-layout-content" > -->
	            <div class="z-tabs" z-tabs tabs-data="allPages" current-page="currentPage" on-select="onNavTabSelect(page)" ctrl-ref="navTab" ></div>
	        <!-- </div> -->
		</div>
	</div>
</div>